package com.bishe.demo.modules.ticket.service.impl;

import com.bishe.demo.modules.ticket.dao.ModelDao;
import com.bishe.demo.modules.ticket.service.ModelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @Description ModelServiceImp
 * @Author YHQ
 * @Date 2021/4/1 10:36
 */
@Service
@Transactional
public class ModelServiceImpl implements ModelService {
    @Autowired
    private ModelDao modelDao;
    //通过起点和终点查看model的id
    @Override
    public Integer getModelIdByStartPointandEndPoint(String startPoint, String endPoint) {
        return modelDao.getModelIdByStartPointandEndPoint(startPoint,endPoint);
    }
    //通过车次名查model的id
    @Override
    public Integer getModelIdByModelName(String modelName) {
        return modelDao.getModelIdByModelName(modelName);
    }
}
